package com.woniuxy.yoga.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniuxy.yoga.pojo.Users;
import com.woniuxy.yoga.mapper.UsersMapper;
import com.woniuxy.yoga.service.UsersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author axq
 * @since 2020-10-21
 */
@Service
public class UsersServiceImpl extends ServiceImpl<UsersMapper, Users> implements UsersService {


    @Autowired
    private UsersMapper usersMapper;

    @Override
    public Users getAll() {
        Users users1 = usersMapper.selectById(1);
        return users1;
    }
    @Override
    public List<Users> getAll2() {
        QueryWrapper<Users> u=new QueryWrapper<Users>();
        List<Users> users = usersMapper.selectList(u);
        return users;
    }

    @Override
    public List<Users> getStu1(Integer coachid) {
        return  usersMapper.getStu1(coachid);
    }

    @Override
    public List<Users> getFriend(Integer accountid) {
        return usersMapper.getFriend(accountid);
    }
}
